﻿@model LoginModel
@{
    ViewData["Title"] = "Login";
}

<h2>Login</h2>

<form id="loginForm" asp-action="DoLogin" asp-controller="Login">
    <table>
        <tr>
            <td>
                @if (Model != null)
                {
                    <p>@Model.Result</p>
                }
            </td>
        </tr>
        <tr>
            <td>用户名</td>
            <td><input type="text" id="userId" asp-for="UserId" /></td>
            <td><span class="label-danger">@ViewBag.ErrorInfo</span></td>
        </tr>
        <tr>
            <td>密码</td>
            <td><input type="password" id="pwd" asp-for="Pwd" /></td>
        </tr>
        <tr>
            <td>
@*                <input type="submit" name="login" value="登录" />*@
                <input type="button" value="登录" onclick="doLogin();" />
            </td>
        </tr>
    </table>
</form>
